package com.training.schedule_management_system_admin.mapper;

import com.training.schedule_management_system_admin.entity.User;
import com.training.schedule_management_system_admin.entity.UserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User getUser(@Param("username") String username, @Param("password") String password);

    User getUserByUsername(@Param("username") String username);

    User getUserWithRoleById(Integer id);

    int insertUserAndRole(@Param("userId") Integer userId,@Param("RoleId") Integer RoleId);

    List<User> getUsernameWithFramework();

    List<User> getUsernameWithOpenTable();

}